<link rel="stylesheet" href="/assets/home/css/avatar.css">
<link rel="stylesheet" href="/assets/home/css/order.css">

<header class="mui-bar mui-bar-nav" style="position: sticky;">
    <a class="mui-icon mui-icon-left-nav mui-pull-left" href="{:url('/home/business/index')}"></a>
    <h1 class="mui-title">我的订单</h1>
</header>
<div class="top_div">
    <!-- <img src="./images/bac.jpg" class="top_img"> -->
    <div class="userInfo">
        <img class="upic" src="{$LoginAuth['avatar_cdn']}" /><br />
        
        <p class="uBalance">{$LoginAuth['nickname'] ? $LoginAuth['nickname'] : $LoginAuth['mobile_text'] }</p>
    </div>
</div>
<div class="mui-content">
    <div id="slider" class="mui-slider mui-fullscreen">
        <div id="sliderSegmentedControl"
            class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
            <div class="mui-scroll">
                <a class="mui-control-item mui-active" href="#item1mobile">
                    视频购买记录
                </a>
                <a class="mui-control-item" href="#item2mobile">
                    消费记录
                </a>
            </div>
        </div>
        <div class="mui-slider-group">
            <div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
                <div id="scroll1" class="mui-scroll-wrapper">
                    <div class="mui-scroll">
                        <ul class="mui-table-view">
                            {if condition="$OrderList"}
                                {foreach $OrderList as $item}
                                    <li class="mui-table-view-cell mui-media">
                                        <div class="mui-media-body">
                                            <p class="subtitle">{$item['subject']['title']}</p>
                                            <p class="suborder">订单号:{$item['code']}</p>
                                            <p class="time">{$item['createtime']|date="Y-m-d H:i:s",###}</p>
                                            <p class="price">￥{$item['total']}</p>
                                            <a href="{:url('/home/subject/order/comment',['orderid' => $item['id']])}">
                                                <button type="button"
                                                    class="mui-btn mui-btn-primary mui-btn-outlined">评价</button>
                                            </a>
                                            <a href="{:url('/home/subject/subject/info',['subjectid' => $item['subject']['id']])}">
                                                <button type="button"
                                                    class="mui-btn mui-btn-primary mui-btn-outlined">立即查看</button>
                                            </a>
                                        </div>
                                    </li>
                                {/foreach}
                            {else /}
                            <li class="mui-table-view-cell mui-media">
                                <a>
                                    <div class="mui-media-body">
                                        暂无购买记录
                                    </div>
                                </a>
                            </li>
                            {/if}
                        </ul>
                    </div>
                </div>
            </div>
            <div id="item2mobile" class="mui-slider-item mui-control-content">
                <div id="scroll2" class="mui-scroll-wrapper">
                    <div class="mui-scroll">
                        <ul class="mui-table-view">
                            {if condition="$RecordList"}
                                {foreach $RecordList as $item}
                                    <li class="mui-table-view-cell mui-media">
                                        <div class="mui-media-body">
                                            <p class="subtitle">{$item['content']}</p>
                                            <p class="time">{$item['createtime']|date="Y-m-d H:i:s",###}</p>
                                            <p class="price">-￥{$item['total']}</p>
                                            
                                        </div>
                                    </li>
                                {/foreach}
                            {else /}
                                <li class="mui-table-view-cell mui-media">
                                    <a>
                                        <div class="mui-media-body">
                                            暂无消费记录
                                        </div>
                                    </a>
                                </li>
                            {/if}
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>